package rpc.loadbalance;

import rpc.extension.SPI;
import rpc.remote.dto.RpcRequest;

import java.util.List;

/**
 * @ClassName: LoadBalance
 * @Description: 负载均衡策略接口
 * @author: Kowk
 * @since:1.0.0
 */
@SPI
public interface LoadBalance {

    /**
     * @Description: 在已注册的服务列表中查找地址
     * @Param: [serviceAddresses, request]
     * @return: java.lang.String
     */
    String selectServiceAddress(List<String> serviceAddresses, RpcRequest request);



}
